#-*- conding:utf-8 -*- 
from socket import *

#用python 模拟tcp数据发送
HOST = '192.168.1.10'
PORT = 10122
BUFSIZE = 128

ADDR = (HOST, PORT)

#准备进行连接
udpCliSock = socket(AF_INET, SOCK_DGRAM)

while True: 
  
  #发送数据
  udpCliSock.sendto("this is test  ok ",ADDR)



udpCliSock.close()

